<?php
/**
 * @version		$Id: view.html.php 25 2010-09-08 15:16:11Z joomlaworks $
 * @package		K2mart
 * @author    JoomlaWorks http://www.joomlaworks.gr
 * @copyright	Copyright (c) 2006 - 2010 JoomlaWorks, a business unit of Nuevvo Webware Ltd. All rights reserved.
 * @license		Commercial - This code cannot be redistributed without permission from Nuevvo Webware Ltd.
 */

// no direct access
defined('_JEXEC') or die('Restricted access');

jimport('joomla.application.component.view');

class K2martViewDashboard extends JView {

	function display($tpl = null) {
		jimport('joomla.html.pane');
		$pane =& JPane::getInstance('Tabs');
		$this->assignRef('pane', $pane);
		$model = &$this->getModel();
		$numOfK2Items = $model->countK2Items();
		$this->assignRef('numOfK2Items', $numOfK2Items);
		$numOfVmProducts = $model->countVmProducts();
		$this->assignRef('numOfVmProducts', $numOfVmProducts);
		$numOfK2martProducts = $model->countK2martProducts();
		$this->assignRef('numOfK2martProducts', $numOfK2martProducts);
		JToolBarHelper::title(':: '.JText::_('Dashboard'), 'k2mart.png');
		JSubMenuHelper::addEntry(JText::_('Dashboard'), 'index.php?option=com_k2mart&view=dashboard', true);
		JSubMenuHelper::addEntry(JText::_('Settings'), 'index.php?option=com_k2mart&view=settings');
		JSubMenuHelper::addEntry(JText::_('Virtuemart Migrator'), 'index.php?option=com_k2mart&view=migrator');
		parent::display($tpl);
	}

}
